package com.xp.config;

import com.yomahub.liteflow.core.FlowExecutor;
import com.yomahub.liteflow.property.LiteflowConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * LiteFlow配置类
 * 
 * 配置LiteFlow执行器和相关参数
 * 
 * @author AI助手
 * @since 2024-12-19
 */
@Configuration
public class LiteFlowConfig {

    /**
     * 配置LiteFlow执行器
     * 
     * @param liteflowConfig LiteFlow配置属性
     * @return FlowExecutor 流程执行器
     */
    @Bean
    public FlowExecutor flowExecutor(LiteflowConfig liteflowConfig) {
        FlowExecutor flowExecutor = new FlowExecutor();
        flowExecutor.setLiteflowConfig(liteflowConfig);
        return flowExecutor;
    }
}